//
//  CAWeiboObject.m
//  qiche
//
//  Created by haley liu on 12-12-17.
//  Copyright (c) 2012年 iCar. All rights reserved.
//

#import "CAWeiboObject.h"

@implementation CAWeiboObject
@synthesize accessToken,accessTokenSecret,weiboType,tempContent;
-(void)dealloc
{
    self.accessToken = nil;
    self.accessTokenSecret = nil;
    self.weiboType = 0;
    self.tempContent = nil;
    [super dealloc];
}

-(id)init
{
    self = [super init];
    return self;
}

-(id)initWithDict:(NSDictionary *)dict
{
    if (!dict) {
        return nil;
    }
    self = [super init];
    if (self) {
        if (![[dict objectForKey:@"accessToken"]isKindOfClass: [NSNull class]]) {
            self.accessToken = [dict objectForKey:@"accessToken"];
        }
        if (![[dict objectForKey:@"accessTokenSecret"]isKindOfClass: [NSNull class]]) {
            self.accessTokenSecret = [dict objectForKey:@"accessTokenSecret"];
        }
        if (![[dict objectForKey:@"weiboType"]isKindOfClass: [NSNull class]]) {
            self.weiboType = [[dict objectForKey:@"weiboType"] intValue];
        }
        if (![[dict objectForKey:@"tempContent"]isKindOfClass: [NSNull class]]) {
            self.tempContent = [dict objectForKey:@"tempContent"];
        }
    }
    return self;
}
@end
